﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Kevin.Framework.Core;

namespace Kevin.Controls
{
    /*----------------------------------------------------------
     * 
     * Grid控件所涉及的枚举定义
     * 
     * 席吉波
     * 
     * 
     *----------------------------------------------------------
     */ 

    /// <summary>
    /// 命令绑定项类型
    /// </summary>
    public enum CommandType
    {
        /// <summary>
        /// 编辑
        /// </summary>
        [EnumDesc("编辑")]
        Edit = 0
        // ,Delete=1
    }

    /// <summary>
    /// 当Grid控件给页面赋值时，
    /// 确定给当前页面还是父页面的控件赋值
    /// </summary>
    public enum TagPage
    {
        /// <summary>
        /// 当前页面
        /// </summary>
        [EnumDesc("当前页面")]
        Current = 0,  
        /// <summary>
        /// 父页面
        /// </summary>
        [EnumDesc("父页面")]
        Parent = 1    
    }

    /// <summary>
    /// 绑定形式，主要是给javascript使用
    /// </summary>
    public enum BindType
    {
        /// <summary>
        /// 数据项绑定
        /// </summary>
        [EnumDesc("数据项绑定")]
        DataBound = 0,
        /// <summary>
        /// 超链接项绑定
        /// </summary>
        [EnumDesc("超链接项绑定")]
        HyperLink = 1,
        /// <summary>
        /// 命令项绑定
        /// </summary>
        [EnumDesc("命令项绑定")]
        CommandField = 2,
        /// <summary>
        /// 弹出项绑定
        /// </summary>
        [EnumDesc("弹出项绑定")]
        PopUp = 3,
        /// <summary>
        /// 子绑定项绑定
        /// </summary>
        [EnumDesc("子绑定项绑定")]
        Extend = 4
    }
    /// <summary>
    /// 获取控件的值(从何属性)
    /// </summary>
    internal enum GetValueType
    {
        /// <summary>
        /// Text属性
        /// </summary>
        [EnumDesc("Text属性")]
        Text,
        /// <summary>
        /// Value属性
        /// </summary>
        [EnumDesc("Value属性")]
        Value,
        /// <summary>
        /// Name属性
        /// </summary>
        [EnumDesc("Name属性")]
        Name,
        /// <summary>
        /// Checked属性
        /// </summary>
        [EnumDesc("Checked属性")]
        Checked
    }

    /// <summary>
    /// 数据对齐方式
    /// </summary>
    public enum AlignType
    {
        /// <summary>
        /// 左对齐
        /// </summary>
        [EnumDesc("左对齐")]
        Left = 0,
        /// <summary>
        /// 居中对齐
        /// </summary>
        [EnumDesc("居中对齐")]
        Center = 1,
        /// <summary>
        /// 右对齐
        /// </summary>
        [EnumDesc("右对齐")]
        Right = 2
    }

    /// <summary>
    /// 分页导航位置
    /// </summary>
    public enum PagerPlace
    {
        /// <summary>
        /// 上方
        /// </summary>
        [EnumDesc("上方")]
        Top,
        /// <summary>
        /// 下方
        /// </summary>
        [EnumDesc("下方")]
        Bottom,
        /// <summary>
        /// 上下都有
        /// </summary>
        [EnumDesc("上下都有")]
        Both
    }
}
